import {
  isNotEmpty,
  IsNotEmpty,
  IsPhoneNumber,
  IsString,
} from 'class-validator';

export class CreateAccountDto {
  @IsNotEmpty({ message: '用户名不能为空' })
  @IsString({ message: '用户名必须存在' })
  username: string;

  @IsNotEmpty()
  @IsString()
  password: string;

  @IsNotEmpty()
  @IsString()
  pwdRepeat: string;

  @IsPhoneNumber('CN', { message: '请输入正确格式的手机号码' })
  phoneNumber: string;
}
